package com.tedu.sp04.feign;
/*
  通过ofenfeign技术远程调用【用户信息】接口
 */
import com.tedu.sp01.entity.User;
import com.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "user-service")
public interface UserClient {
    @GetMapping("/{userId}")
    JsonResult<User> getUser(@PathVariable Integer userId);
    @GetMapping("/{userId}/score")  // 7?score=100
    JsonResult<?> addScore(@PathVariable Integer userId,
                           @PathVariable Integer score);
}
